﻿using CommonLib.Pattern.Pool;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class EffectItemFactory
{
	public enum EffectItemType
	{
		None = 0,
		Plus = 1,
		Speed = 2,
		SpeedMulti = 3,
		Minus = 4,
	}

	static public ReusableObject GetEffectItem(EffectItemType type)
	{
		switch (type)
		{
			case EffectItemType.Plus:
				return ObjectPool.Instance.AcquireObject<ReusableRolePlusItem>();
				//break;
			case EffectItemType.Speed:
				return ObjectPool.Instance.AcquireObject<ReusableRoleSpeedItem>();
			//break;
			case EffectItemType.SpeedMulti:
				return ObjectPool.Instance.AcquireObject<ReusableRoleSpeedMultiItem>();
			case EffectItemType.Minus:
				return ObjectPool.Instance.AcquireObject<ReusableRoleMinusItem>();
		}
		return null;
	}
}
